# @Author：silence
# @Email：792245022@qq.com
# @Date：2025/3/6 23:12

# 1、导入 selenium
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

# 设置 Chrome 驱动
# 默认路径：C:\Users\John\.wdm\drivers\chromedriver\win64\119.0.6045.105\chromedriver.exe
service = Service(ChromeDriverManager().install())

# 2、创建浏览器操作对象
browser = webdriver.Chrome(service=service)

# 3、访问网站
browser.get("https://www.jd.com/")

# 获取网页源码
content = browser.page_source

print(content)

input()